<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/component/pear/css/pear.css" />
    <script src="/static/component/layui/layui.js"></script>
    <script src="/static/component/pear/pear.js"></script>
</head>
<body>
<form class="layui-form" action="">
    <div class="layui-tab layui-tab-brief" lay-filter="demo">
        <ul class="layui-tab-title">
          <li class="layui-this">基本设置</li>
          <li>高级设置</li>
          <li>微信设置</li>
          <li>模版设置</li>
          <li>报名设置</li>
          <li>分组与属性</li>
        </ul>
        <div class="layui-tab-content">
          <div class="layui-tab-item layui-show">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    标题
                </label>
                <div class="layui-col-sm5">
                    <input type="text" class="layui-input layui-form-danger"  placeholder="标题" name="title" type="text" value="{$model['title']??""}"/>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        开始时间
                    </label>
                    <div class="layui-col-sm5">
                        <input type="text" class="layui-input layui-form-danger" name="begintime" type="text" lay-verify="required"/>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        结束时间
                    </label>
                    <div class="layui-col-sm5">
                        <input type="text" class="layui-input layui-form-danger" name="stoptime" type="text" lay-verify="required"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    封面图
                </label>
                <div class="layui-input-block">
                    {:opt_photo("fmimage")}
                <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                    <i class="fa fa-image">
                    </i>
                    上传图片
                </button>
                <input name="fmimage" type="hidden" value="{$model['fmimage']??""}"/>
                <div class="upload-image">
                    <span>
                    </span>
                    <img class="upload-image" src="{$model['fmimage']??""}"/>
                </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    说明的标题
                </label>
                <div class="layui-col-sm5" style="width: 21.333333%;">
                    <input type="text" class="layui-input layui-form-danger"  value="活动说明" name="hdsmbt" type="text" value="{$model['hdsmbt']??""}"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    内容
                </label>
                <div class="layui-input-block">
                    <textarea id="content" name="content" type="text/plain" style="width:100%;margin-bottom:20px;">{$model['content']??""}</textarea>
                </div>
            </div>
          </div>
          <div class="layui-tab-item">
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        单选或多选
                    </label>
                    <div class="layui-col-block">
                        <input type="radio" name="danxuan" value="0" title="单选" checked lay-filter="danxuan">
                        <input type="radio" name="danxuan" value="1" title="多选" lay-filter="danxuan">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        投票限制
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="cishu" value="0" title="每天可投" checked>
                        <input type="radio" name="cishu" value="1" title="只投一天">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs3">
                    <label class="layui-form-label">
                        每天次数
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="daycishu" type="text" value="3"/>
                    </div>
                </div>
                <div class="layui-col-xs3" id="div15">
                    <label class="layui-form-label">
                        同一编号
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="daypiao" type="text" value="3"/>
                    </div>
                </div>
                <div class="layui-col-xs3" id="div1" style="display: none;">
                    <label class="layui-form-label">
                        最多个数
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="maxxuan" type="text" value="10"/>
                    </div>
                </div>
                <div class="layui-col-xs3" id="div2" style="display: none;">
                    <label class="layui-form-label">
                        最少个数
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="minxuan" type="text" value="10"/>
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs3">
                    <label class="layui-form-label">
                        限制IP/天
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="ipdaypiao" type="text" value="500"/>
                    </div>
                </div>
                <div class="layui-col-xs3">
                    <label class="layui-form-label">
                        每分钟数
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="shijian" type="text" value="10"/>
                    </div>
                </div>
                <div class="layui-col-xs3">
                    <label class="layui-form-label">
                        得票量
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="piaoshu" type="text" value="500"/>
                    </div>
                </div>
                <div class="layui-col-xs3">
                    <label class="layui-form-label">
                        暂停分钟数
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="fenzhongshu" type="text" value="120"/>
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        投票时间
                    </label>
                    <div class="layui-col-sm5">
                        <input type="text" class="layui-input layui-form-danger" name="toutime" type="text" lay-verify="required"/>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        暂停时间
                    </label>
                    <div class="layui-col-sm5">
                        <input type="text" class="layui-input layui-form-danger" name="notoutime" type="text" lay-verify="required"/>
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs8">
                    <label class="layui-form-label">
                        投票类型
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="type" value="0" title="图片" checked>
                        <input type="radio" name="type" value="1" title="文字">
                        <input type="radio" name="type" value="2" title="音频">
                        <input type="radio" name="type" value="3" title="视频">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs12">
                    <label class="layui-form-label">
                        验证码
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="hdyzm" value="0" title="不用" checked>
                        <input type="radio" name="hdyzm" value="1" title="数字">
                        <input type="radio" name="hdyzm" value="2" title="文字">
                        <input type="radio" name="hdyzm" value="3" title="滑动">
                        <input type="radio" name="hdyzm" value="4" title="点击">
                        <input type="radio" name="hdyzm" value="5" title="轨迹">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        排序方式
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="pxfs" value="0" title="编号" checked>
                        <input type="radio" name="pxfs" value="1" title="时间">
                        <input type="radio" name="pxfs" value="2" title="票数">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        排序顺序
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="pxsx" value="0" title="正序" checked>
                        <input type="radio" name="pxsx" value="1" title="倒序">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        按钮文字
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="anwz" value="0" title="投票" checked>
                        <input type="radio" name="anwz" value="1" title="助力">
                        <input type="radio" name="anwz" value="2" title="点赞">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        限制地域
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="diyu" value="0" title="全国" checked>
                        <input type="radio" name="diyu" value="1" title="河北">
                        <input type="radio" name="diyu" value="2" title="邢台">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        头部显示
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="tbzs" value="0" title="显示" checked>
                        <input type="radio" name="tbzs" value="1" title="不显">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        投票状态
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="state" value="0" title="正常" checked>
                        <input type="radio" name="state" value="1" title="关闭">
                        <input type="radio" name="state" value="2" title="删除">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        是否缓存
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="huancun" value="0" title="开启" checked>
                        <input type="radio" name="huancun" value="1" title="关闭">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        掌上邢台
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="sfapp" value="0" title="不投" checked>
                        <input type="radio" name="sfapp" value="1" title="投票">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        排行进详情
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="phjxq" value="0" title="关闭" checked>
                        <input type="radio" name="phjxq" value="1" title="开启">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        网页H5端
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="wyh5" value="0" title="关闭" checked>
                        <input type="radio" name="wyh5" value="1" title="开启">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        首页音视频
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="syysp" value="0" title="关闭" checked>
                        <input type="radio" name="syysp" value="1" title="开启">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        微信端
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="wxd" value="0" title="关闭">
                        <input type="radio" name="wxd" value="1" title="开启" checked>
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        总暂停
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="zzt" value="0" title="关闭" checked>
                        <input type="radio" name="zzt" value="1" title="开启">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        样式
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="ispubu" value="0" title="整齐" checked>
                        <input type="radio" name="ispubu" value="1" title="瀑布流">
                    </div>
                </div>
            </div>
          </div>
          <div class="layui-tab-item">
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs3">
                    <label class="layui-form-label">
                        几个公众号
                    </label>
                    <div class="layui-col-sm2">
                        <input type="text" class="layui-input layui-form-danger" name="numgzh" type="text" value="1"/>
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <label class="layui-form-label">走登录</label>
                    <div class="layui-input-block">
                    <select name="zdlgzh" lay-verify="required">
                        <!-- <option value="xingtaiwang">邢台网</option>
                        <option value="xingtaifabu">邢台发布</option> -->
                    </select>
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <label class="layui-form-label">关注后投票</label>
                    <div class="layui-input-block">
                        <input type="radio" name="isguanzhu" value="0" title="不用" checked>
                        <input type="radio" name="isguanzhu" value="1" title="关注">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    选择公众号
                </label>
                <div class="layui-col-sm10" id="dlgzhhtml">
                    <!-- <input type="checkbox" name="dlgzh" value="邢台网" title="邢台网"><div class="layui-unselect layui-form-checkbox"><span>邢台网</span><i class="layui-icon layui-icon-ok"></i></div>
                    <input type="checkbox" name="dlgzh" value="邢台发布" title="邢台发布"><div class="layui-unselect layui-form-checkbox"><span>邢台发布</span><i class="layui-icon layui-icon-ok"></i></div> -->
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    分享标题
                </label>
                <div class="layui-col-sm6">
                    <input type="text" class="layui-input layui-form-danger"  placeholder="分享标题" name="wxsharetitle" type="text" value="{$model['wxsharetitle']??""}"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    分享描述
                </label>
                <div class="layui-col-sm6">
                    <input type="text" class="layui-input layui-form-danger"  placeholder="分享描述" name="wxsharedesc" type="text" value="{$model['wxsharedesc']??""}"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    分享链接
                </label>
                <div class="layui-col-sm6">
                    <input type="text" class="layui-input layui-form-danger"  placeholder="分享链接" name="shareurl" type="text" value="{$model['shareurl']??""}"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    分享图片
                </label>
                <div class="layui-input-block">
                    {:opt_photo("wxshareimg")}
                <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                    <i class="fa fa-image">
                    </i>
                    上传图片
                </button>
                <input name="wxshareimg" type="hidden" value="{$model['wxshareimg']??""}"/>
                <div class="upload-image">
                    <span>
                    </span>
                    <img class="upload-image" src="{$model['wxshareimg']??""}"/>
                </div>
                </div>
            </div>
          </div>
          <div class="layui-tab-item">
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        主色调
                    </label>
                    <div class="layui-input-block">
                        <div id="test1"></div>
                        <input type="hidden" name="zsd">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        按钮颜色
                    </label>
                    <div class="layui-input-block">
                        <div id="test2"></div>
                        <input type="hidden" name="anniucol">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">音频：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="audio"  id="inputaudiourl" placeholder="音频地址" value="" class="layui-input"> 
                    </div>
                    <button class="pear-btn pear-btn-primary pear-btn-sm upload-audio" type="button" name="upload-audio">
                        上传音频
                    </button>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        音频状态
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="sfaudio" value="0" title="关闭" checked>
                        <input type="radio" name="sfaudio" value="1" title="开启">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs4">
                    <label class="layui-form-label">
                        底部导航
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="dbanwzxs" value="0" title="显示" checked lay-filter="dbanwzxs">
                        <input type="radio" name="dbanwzxs" value="1" title="隐藏" lay-filter="dbanwzxs">
                    </div>
                </div>
                <div class="layui-col-xs1">
                    <div class="layui-col-sm8" id="div16" style="display:block;">
                        <input type="text" name="dbwode" value="我的" class="layui-input"> 
                    </div>
                </div>
                <div class="layui-col-xs1">
                    <div class="layui-col-sm8" id="div17" style="display:block;">
                        <input type="text" name="dbpaihang" value="排行" class="layui-input"> 
                    </div>
                </div>
                <div class="layui-col-xs1">
                    <div class="layui-col-sm8" id="div18" style="display:block;">
                        <input type="text" name="dbguize" value="规则" class="layui-input"> 
                    </div>
                </div>
                <div class="layui-col-xs1">
                    <div class="layui-col-sm8" id="div19" style="display:block;">
                        <input type="text" name="dbbaoming" value="报名" class="layui-input"> 
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <div class="layui-col-sm3" id="div20" style="display:block;">
                        <input type="text" name="dbzidingyi" value="自定义" class="layui-input"> 
                    </div>
                    <div class="layui-col-sm9" id="div21" style="display:block;">
                        <input type="text" name="dbzidingyiurl" placeholder="自定义url" class="layui-input"> 
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    顶部跑马灯
                </label>
                <div class="layui-col-sm6">
                    <input type="text" class="layui-input layui-form-danger"  placeholder="顶部跑马灯" name="yjhsm" type="text" value="{$model['yjhsm']??""}"/>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">底部版权</label>
                    <div class="layui-col-sm7">
                        <input type="text" name="dbbq"  value="@邢台网" class="layui-input  layui-form-danger"> 
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        版权显示
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="dbbqxs" value="0" title="关闭" checked>
                        <input type="radio" name="dbbqxs" value="1" title="显示">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        选择模板
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="moban" value="0" title="模板一" checked>
                        <input type="radio" name="moban" value="1" title="模板二">
                        <input type="radio" name="moban" value="2" title="模板三">
                        <input type="radio" name="moban" value="3" title="模板四">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        封面轮播
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="lunbotuxs" value="0" title="关闭" checked lay-filter="lunbotuxs">
                        <input type="radio" name="lunbotuxs" value="1" title="开启" lay-filter="lunbotuxs">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div9" style="display:none;">
                    <label class="layui-form-label">
                        轮播图一
                    </label>
                    <div class="layui-input-block">
                        {:opt_photo("lunboimgyi")}
                    <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                        <i class="fa fa-image">
                        </i>
                        上传图片
                    </button>
                    <input name="lunboimgyi" type="hidden" value="{$model['lunboimgyi']??""}"/>
                    <div class="upload-image">
                        <span>
                        </span>
                        <img class="upload-image" src="{$model['lunboimgyi']??""}"/>
                    </div>
                    </div>
                </div>
                <div class="layui-col-xs6" id="div10" style="display:none;">
                    <label class="layui-form-label">跳转链接</label>
                    <div class="layui-input-inline">
                        <input type="text" name="lunbourlyi"  placeholder="跳转链接" value="" class="layui-input"> 
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div11" style="display:none;">
                    <label class="layui-form-label">
                        轮播图二
                    </label>
                    <div class="layui-input-block">
                        {:opt_photo("lunboimger")}
                    <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                        <i class="fa fa-image">
                        </i>
                        上传图片
                    </button>
                    <input name="lunboimger" type="hidden" value="{$model['lunboimger']??""}"/>
                    <div class="upload-image">
                        <span>
                        </span>
                        <img class="upload-image" src="{$model['lunboimger']??""}"/>
                    </div>
                    </div>
                </div>
                <div class="layui-col-xs6" id="div12" style="display:none;">
                    <label class="layui-form-label">跳转链接</label>
                    <div class="layui-input-inline">
                        <input type="text" name="lunbourler"  placeholder="跳转链接" value="" class="layui-input"> 
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div13" style="display:none;">
                    <label class="layui-form-label">
                        轮播图三
                    </label>
                    <div class="layui-input-block">
                        {:opt_photo("lunboimgsan")}
                    <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                        <i class="fa fa-image">
                        </i>
                        上传图片
                    </button>
                    <input name="lunboimgsan" type="hidden" value="{$model['lunboimgsan']??""}"/>
                    <div class="upload-image">
                        <span>
                        </span>
                        <img class="upload-image" src="{$model['lunboimgsan']??""}"/>
                    </div>
                    </div>
                </div>
                <div class="layui-col-xs6" id="div14" style="display:none;">
                    <label class="layui-form-label">跳转链接</label>
                    <div class="layui-input-inline">
                        <input type="text" name="lunbourlsan"  placeholder="跳转链接" value="" class="layui-input"> 
                    </div>
                </div>
            </div>
        </div>
          <div class="layui-tab-item">
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        是否报名
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="baoming" value="0" title="关闭" checked lay-filter="baoming">
                        <input type="radio" name="baoming" value="1" title="开启" lay-filter="baoming">
                    </div>
                </div>
                <div class="layui-col-xs6" id="div3" style="display: none;">
                    <label class="layui-form-label">
                        是否审核
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="bmshenhe" value="0" title="审核" checked>
                        <input type="radio" name="bmshenhe" value="1" title="不审">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div4" style="display: none;">
                    <label class="layui-form-label">
                        开始报名
                    </label>
                    <div class="layui-col-sm5">
                        <input type="text" class="layui-input layui-form-danger" name="bmkstime" type="text" value="2022-01-24 00:00:00"/>
                    </div>
                </div>
                <div class="layui-col-xs6" id="div5" style="display: none;">
                    <label class="layui-form-label">
                        结束报名
                    </label>
                    <div class="layui-col-sm5">
                        <input type="text" class="layui-input layui-form-danger" name="bmjstime" type="text" value="2022-01-24 00:00:00"/>
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs12" id="div6" style="display: none;">
                    <label class="layui-form-label">
                        报名项
                    </label>
                    <div class="layui-input-block" id="bmxianghtml">

                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div7" style="display: none;">
                    <label class="layui-form-label">
                        允许前台上传照片个数
                    </label>
                    <div class="layui-col-sm2">
                        <input type="text" class="layui-input layui-form-danger" name="bmnumimg" type="text" value="3"/>
                    </div>
                </div>
                <div class="layui-col-xs6" id="div8" style="display: none;">
                    <label class="layui-form-label">
                        图片必填
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="sfbmimg" value="0" title="不是" checked>
                        <input type="radio" name="sfbmimg" value="1" title="必填">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div28" style="display: none;">
                    <label class="layui-form-label">
                        限制报名次数
                    </label>
                    <div class="layui-col-sm2">
                        <input type="text" class="layui-input layui-form-danger" name="bmnum" type="text" value="999"/>
                    </div>
                </div>
                <div class="layui-col-xs6" id="div29" style="display: none;">
                    <label class="layui-form-label">
                        报名类型
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="bmkind" value="0" title="正常报名" checked>
                        <input type="radio" name="bmkind" value="1" title="其他报名">
                    </div>
                </div>
            </div>
          </div>
          <div class="layui-tab-item">
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        是否分组
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="fenzu" value="0" title="不用" checked lay-filter="fenzu">
                        <input type="radio" name="fenzu" value="1" title="开启" lay-filter="fenzu">
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <label class="layui-form-label">
                        属性设置
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="shuxing" value="0" title="不用" checked lay-filter="shuxing">
                        <input type="radio" name="shuxing" value="1" title="开启" lay-filter="shuxing">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div22" style="display: none;">
                    <label class="layui-form-label">
                        分组名称
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="fznamexs" value="0" title="显示" checked>
                        <input type="radio" name="fznamexs" value="1" title="隐藏">
                    </div>
                </div>
                <div class="layui-col-xs6" id="div23" style="display: none;">
                    <label class="layui-form-label">
                        总分组名称
                    </label>
                    <div class="layui-input-block">
                        <input type="radio" name="zfznamexs" value="0" title="显示" checked>
                        <input type="radio" name="zfznamexs" value="1" title="隐藏">
                    </div>
                </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs6" id="div24" style="display: none;">
                    <label class="layui-form-label">
                        分组名称(已"/"区分)
                    </label>
                    <div class="layui-col-sm8">
                        <input type="text" class="layui-input layui-form-danger" name="fenzuname" type="text" placeholder="第一组名称/第二组名称/第三组名称"/>
                    </div>
                </div>
                <div class="layui-col-xs3" id="div25" style="display: none;">
                    <label class="layui-form-label">
                        每组限票
                    </label>
                    <div class="layui-col-sm3">
                        <input type="text" class="layui-input layui-form-danger" name="fenzupiao" type="text" value="999"/>
                    </div>
                </div>
                <div class="layui-col-xs3" id="div26" style="display: none;">
                    <label class="layui-form-label">一行几个</label>
                    <div class="layui-input-block">
                      <select name="yihangjige" lay-verify="required">
                        <option value="1">1</option>
                        <option value="2">2</option>
                      </select>
                    </div>
                  </div>
            </div>
            <div class="layui-row" style="margin-bottom: 15px;">
                <div class="layui-col-xs12" id="div27" style="display: none;">
                    <label class="layui-form-label">
                        选择属性
                    </label>
                    <div class="layui-input-block" id="shuxinghtml">

                    </div>
                </div>
            </div>
          </div>
        </div>
        <div class="bottom" style="position:relative;">
            <div class="button-container">
                <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="save">
                    <i class="layui-icon layui-icon-ok"></i>
                    提交
                </button>
                <!-- <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                    <i class="layui-icon layui-icon-refresh"></i>
                    重置
                </button> -->
            </div>
        </div>
      </div>
</form>
<script>
    layui.use(['form', 'jquery','tinymce','uploads','upload','laydate','colorpicker'], function () {
        let form = layui.form;
        let $ = layui.jquery;
        let tinymce = layui.tinymce;
        var laydate = layui.laydate;
        var colorpicker = layui.colorpicker;
        let MODULE_PATH2 = "{$Request.root}/admin.zccandidate/";

        var upload = layui.upload;
        var leftUrl = window.location.pathname.split("/")[1];
        if(leftUrl.indexOf(".php")>0){
            var leftUrl = '/'+ leftUrl;
        }else{
            var leftUrl = '';
        }
        upload.render({
            elem: "[name='upload-audio']",
            url: leftUrl + '/tpadmin/index/uploadyinpin',
            accept: 'audio',

            done: function (res) {
                layer.msg('上传成功');
                // console.log(res.data.src);
                $('#inputaudiourl').val(res.data.src);
            }
        });

        $.ajax({
            url:'http://newuc.xtxcm.com/api/uc/wxlist',
            data:{},
            dataType: 'json',
            type: 'GET',
            success: function(res) {
                $.ajax({
                    url:'{$Request.root}/admin.zavote/zhengzhpz',
                    data:{id:res.data},
                    dataType: 'json',
                    type: 'POST',
                    success: function(res) {

                    }
                });
                // console.log(res.data);
                var htmla = '';
                for (var j = 0; j < res.data.length; j++) {
                    htmla += "<option value=" +res.data[j]['appid'] + ">" +res.data[j]['appname'] + "</option>";
                }
                $("[name='zdlgzh']").append(htmla);

                var html = '';
                for (var j = 0; j < res.data.length; j++) {
                    html += "<input type='checkbox' name='dlgzh' value=" +res.data[j]['appid'] + " title=" +res.data[j]['appname'] + "><div class='layui-unselect layui-form-checkbox'><span>" +res.data[j]['appname'] + "</span><i class='layui-icon layui-icon-ok'></i></div>";
                }
                $("#dlgzhhtml").append(html);
                form.render();
            }
        });
 


        $.ajax({
            url:'{$Request.root}/admin.zavote/shuxing',
            data:{},
            dataType: 'json',
            type: 'POST',
            success: function(res) {
                // console.log(res);
                var html = '';
                for (var j = 0; j < res.shuxingnum; j++) {
                    html += "<input type='checkbox' name='shuxingzhi' value=" +res.shuxing[j].id + " title=" +res.shuxing[j].wxgzgname + "><div class='layui-unselect layui-form-checkbox'><span>" +res.shuxing[j].wxgzgname + "</span><i class='layui-icon layui-icon-ok'></i></div>";
                }
                $("#shuxinghtml").append(html);

                var htmla = '';
                for (var j = 0; j < res.shuxingnum; j++) {
                    htmla += "<input type='checkbox' name='bmxiang' value=" +res.shuxing[j].id + " title=" +res.shuxing[j].wxgzgname + "><div class='layui-unselect layui-form-checkbox'><span>" +res.shuxing[j].wxgzgname + "</span><i class='layui-icon layui-icon-ok'></i></div>";
                }
                $("#bmxianghtml").append(htmla);
                form.render();
            }
        })

        form.on('radio(danxuan)',function(data){
            if(data.value == "0"){
                $("#div1").css("display","none");
                $("#div2").css("display","none");
                $("#div15").css("display","block");
            } else if(data.value == "1") {
                $("#div1").css("display","block");
                $("#div2").css("display","block");
                $("#div15").css("display","none");
            }
        })

        form.on('radio(baoming)',function(data){
            if(data.value == "0"){
                $("#div3").css("display","none");
                $("#div4").css("display","none");
                $("#div5").css("display","none");
                $("#div6").css("display","none");
                $("#div7").css("display","none");
                $("#div28").css("display","none");
                $("#div8").css("display","none");
                $("#div29").css("display","none");
            } else if(data.value == "1") {
                $("#div3").css("display","block");
                $("#div4").css("display","block");
                $("#div5").css("display","block");
                $("#div6").css("display","block");
                $("#div7").css("display","block");
                $("#div28").css("display","block");
                $("#div8").css("display","block");
                $("#div29").css("display","block");
            }
        })

        form.on('radio(lunbotuxs)',function(data){
            if(data.value == "0"){
                $("#div9").css("display","none");
                $("#div10").css("display","none");
                $("#div11").css("display","none");
                $("#div12").css("display","none");
                $("#div13").css("display","none");
                $("#div14").css("display","none");
            } else if(data.value == "1") {
                $("#div9").css("display","block");
                $("#div10").css("display","block");
                $("#div11").css("display","block");
                $("#div12").css("display","block");
                $("#div13").css("display","block");
                $("#div14").css("display","block");
            }
        })

        form.on('radio(dbanwzxs)',function(data){
            if(data.value == "1"){
                $("#div16").css("display","none");
                $("#div17").css("display","none");
                $("#div18").css("display","none");
                $("#div19").css("display","none");
                $("#div20").css("display","none");
                $("#div21").css("display","none");
            } else if(data.value == "0") {
                $("#div16").css("display","block");
                $("#div17").css("display","block");
                $("#div18").css("display","block");
                $("#div19").css("display","block");
                $("#div20").css("display","block");
                $("#div21").css("display","block");
            }
        })

        form.on('radio(fenzu)',function(data){
            if(data.value == "0"){
                $("#div22").css("display","none");
                $("#div23").css("display","none");
                $("#div24").css("display","none");
                $("#div25").css("display","none");
                $("#div26").css("display","none");
            } else if(data.value == "1") {
                $("#div22").css("display","block");
                $("#div23").css("display","block");
                $("#div24").css("display","block");
                $("#div25").css("display","block");
                $("#div26").css("display","block");
            }
        })

        form.on('radio(shuxing)',function(data){
            if(data.value == "0"){
                $("#div27").css("display","none");
            } else if(data.value == "1") {
                $("#div27").css("display","block");
            }
        })

        //常规使用
        colorpicker.render({
            elem: '#test1' //绑定元素
            ,change: function(color){ //颜色改变的回调
                $("[name='zsd']").val(color);
            }
        });

        //常规使用
        colorpicker.render({
            elem: '#test2' //绑定元素
            ,change: function(color){ //颜色改变的回调
                $("[name='anniucol']").val(color);
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='begintime']",
            type: 'datetime'
            ,done: function(value, date, endDate){
                // console.log(value); //得到日期生成的值，如：2017-08-18
                // $("[name='toutime']").val(value);
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='stoptime']",
            type: 'datetime'
            ,done: function(value, date, endDate){
                // console.log(value); //得到日期生成的值，如：2017-08-18
                // $("[name='notoutime']").val(value);
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='toutime']",
            type: 'time',
            value: '00:30:00' //必须遵循format参数设定的格式
            ,done: function(value, date, endDate){
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='notoutime']",
            type: 'time',
            value: '05:30:00' //必须遵循format参数设定的格式
            ,done: function(value, date, endDate){
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='bmkstime'],[name='bmjstime']",
            type: 'datetime'
            ,done: function(value, date, endDate){
                // console.log(value); //得到日期生成的值，如：2017-08-18
            }
        });

        //弹出窗设置 自己设置弹出百分比
        function screen1() {
                if (typeof width !== 'number' || width === 0) {
                width = $(window).width() * 1;
                }
                if (typeof height !== 'number' || height === 0) {
                height = $(window).height() + 0;
                }
                return [width + 'px', height + 'px'];
            }
        
        //建立编辑器
        var content  = tinymce.render({ elem: "#content",height: 350,inline:false,placeholder:"在此输入正文",
        relative_urls: false,remove_script_host: false,
        auto_focus: true,toolbar_mode : "floating",toolbar_sticky: false,quickbars_insert_toolbar:"",images_upload_url:"{$Request.root}/index/upload",image_advtab: true,menubar:true});

        form.on('submit(save)', function (data) {
            //将页面全部复选框选中的值拼接到一个数组中
            var arr_box = [];
            $('input[name=shuxingzhi]:checked').each(function() {
                arr_box.push($(this).val());
            });
            var shuxingzhi = arr_box.toString()
            data.field.shuxingzhi=shuxingzhi;


            //将页面全部复选框选中的值拼接到一个数组中
            var arr_boxa = [];
            $('input[name=bmxiang]:checked').each(function() {
                arr_boxa.push($(this).val());
            });
            var bmxiang = arr_boxa.toString()
            data.field.bmxiang=bmxiang;


            //将页面全部复选框选中的值拼接到一个数组中
            var arr_boxa1 = [];
            $('input[name=dlgzh]:checked').each(function() {
                arr_boxa1.push($(this).val());
            });
            var dlgzh = arr_boxa1.toString()
            data.field.dlgzh=dlgzh;
            
            
            // console.log(shuxingzhi);
            // return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。

            data.field.content=content.getContent();
            //编写自己的判断逻辑（不能为空、必须为数字等）
            $.ajax({
                data: JSON.stringify(data.field),
                dataType: 'json',
                contentType: 'application/json',
                type: 'post',
                success: function (res) {
                    //判断有没有权限
                    if (res && res.code == 999) {
                        layer.msg(res.msg, {
                            icon: 5,
                            time: 2000,
                        })
                        return false;
                    } else if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1000}, function () {
                            layer.confirm('现在去添加候选?', {
                                cancel: function(){
                                    parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                                    parent.layui.table.reload("dataTable");
                                },
                                title: false,
                                btn: ['确定','取消'] //按钮
                            }, function(){
                                layer.open({
                                    type: 2,
                                    maxmin: false,
                                    title: '候选管理',
                                    shade: 0.1,
                                    area: screen1(),
                                    content: MODULE_PATH2 + 'index/id/'+res.data['pid'],
                                    cancel : function() {
                                        // 你点击右上角 X 取消后要做什么
                                        parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                                        parent.layui.table.reload("dataTable");
                                    },
                                });
                            }, function(){
                                parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                                parent.layui.table.reload("dataTable");
                            });
                        });
                    } else {
                        layer.msg(res.msg,{icon:2,time:1000});
                    }
                }
            })
            return false;
        });
    })
</script>
</body>
</html>